#ifndef MAMC_H_
#define MAMC_H_

typedef long double LD;
typedef unsigned long long ULL;

/* Moguci metodi integracije */
enum IntegrationMethod
{
	IM_Uniform,
	IM_MonteCarlo,
	IM_AdaptiveMC
};

/* Struktura za enkapsulaciju jednog testnog primera */
typedef struct
{
	LD (*mathFunction1D)(LD);
	LD (*mathFunction2D)(LD, LD);
	LD lowerLimitX;
	LD upperLimitX;
	LD lowerLimitY;
	LD upperLimitY;
	LD multiplier;
	LD result;
} MAMC_TestCase;

LD integrateFunction(LD (*mathFunction)(LD), LD lowerLimit, LD upperLimit, IntegrationMethod method, ULL samples, LD &mean, LD &variance);
LD integrateFunction2D(LD (*mathFunction)(LD, LD), LD lowerLimitX, LD upperLimitX, LD lowerLimitY, LD upperLimitY, IntegrationMethod method, ULL samples, LD &mean, LD &variance);
LD integrateFunction(MAMC_TestCase &test, IntegrationMethod method, ULL samples, LD &mean, LD &variance);

void setAdaptiveSteps(int steps);
ULL getSampleCount();
void testIntegrations(LD (*mathFunction)(LD), LD lowerLimit, LD upperLimit, ULL samples, LD result);
void testIntegrations(MAMC_TestCase &test, ULL samples);

#endif /* MAMC_H_ */
